package com.naiterui.ehp.bp.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 * <P>功能描述 : 医生自定义服务 </P>
 * <P>File name : DrCustomCharge </P>
 * <P>Author : 王泽浩 </P>
 * <P>E-Mail : 1028625100@qq.com </P>
 * <P>Date : 2017/3/29 下午2:58</P>
 */
@Entity
@Table(name = "dr_custom_charge")
public class DrCustomCharge implements java.io.Serializable {

    /**
     * 自定义服务购买状态 未购买
     */
    public static final int BUY_STATUS_NOT = 1;

    /**
     * 自定义服务购买状态 已购买
     */
    public static final int BUY_STATUS_SUCCESS = 2;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /**
     * 医生ID
     */
    @Column(name = "doctor_id", nullable = false)
    private Long doctorId;

    /**
     * 患者ID
     */
    @Column(name = "patient_id", nullable = false)
    private Long patientId;

    /**
     * 产品名称
     */
    @Column(name = "product_name", nullable = false)
    private String productName;

    /**
     * 产品价格
     */
    @Column(name = "price", nullable = false)
    private Long price;

    /**
     * 产品简介
     */
    @Column(name = "synopsis")
    private String synopsis;

    /**
     * 服务购买状态
     */
    @Column(name = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @Column(name = "created_at", nullable = false)
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by", nullable = false)
    private String createdBy;

    /**
     * 更新时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 更新人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 版本
     */
    @Version
    private Integer version;

    public DrCustomCharge() {
    }

    public DrCustomCharge(Long id, Long doctorId, Long patientId, String productName, Long price, String synopsis, Integer status, Date createdAt,
            String createdBy, Date changedAt, String changedBy, Integer version) {
        this.id = id;
        this.doctorId = doctorId;
        this.patientId = patientId;
        this.productName = productName;
        this.price = price;
        this.synopsis = synopsis;
        this.status = status;
        this.createdAt = createdAt;
        this.createdBy = createdBy;
        this.changedAt = changedAt;
        this.changedBy = changedBy;
        this.version = version;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    public Long getPatientId() {
        return patientId;
    }

    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public String getSynopsis() {
        return synopsis;
    }

    public void setSynopsis(String synopsis) {
        this.synopsis = synopsis;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    public String getChangedBy() {
        return changedBy;
    }

    public void setChangedBy(String changedBy) {
        this.changedBy = changedBy;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "DrCustomCharge{" + "id=" + id + ", doctorId=" + doctorId + ", patientId=" + patientId + ", productName='" + productName + '\''
                + ", price=" + price + ", synopsis='" + synopsis + '\'' + ", status=" + status + ", createdAt=" + createdAt + ", createdBy='"
                + createdBy + '\'' + ", changedAt=" + changedAt + ", changedBy='" + changedBy + '\'' + ", version=" + version + '}';
    }
}
